<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="all.css" type="text/css" media="screen" />
<script src="jquery-1.7.2.min.js"></script>
<script src="login.js"></script>
<script src="edit.js"></script>
<script src="enter.js"></script>
<title>活动信息 - <c:out value="${leagueBean.name}" /></title>


<script type="text/javascript">
window.onload=function(){
rightH=document.getElementById("xinxi_right").offsetHeight;
if(rightH<600){
	document.getElementById("xinxi_left").style.height=600+"px";}
	else{
		document.getElementById("xinxi_left").style.height=rightH+"px";
	}
select();
}
</script>


</head>

<body>
<div id="main">
	<div id="header">
       <div id="header_inner">
	   
	  
          <div id="header_inner_top">
          
         <div id="container">
              <jsp:include page="./head.jsp" flush="true"/>
        </div>
        </div>
       
	</div>
    </div>
	<div id="xinxi_body">
    	<div id="xinxi_left">
        	<div id="xinxi_left_left">
        		<div id="left_logo">
               		<a class="left_a" href="http://herald.seu.edu.cn" >
              		 </a>  
            	</div>
                <div id="left_platform">
               		<a class="left_a"  href="http://herald.seu.edu.cn/league_p/" >
                 	
              		 </a>  
            	</div>
                <div id="left_home">
               		<a class="left_a" href="home.jsp?league=<%=request.getParameter("league") %>" >
                 	
              		 </a>  
            	</div>
                <div id="left_information">
               		<a class="left_a"  href="javascript:void(0)" >
                 	
              		 </a>  
            	</div>
                <div id="left_album">
               		<a class="left_a"  href="albums.jsp?league=<%=request.getParameter("league") %>" >
                 	
              		 </a>  
            	</div>
                <div id="left_recruiting">
               		<a class="left_a" href="recruit.jsp?league=<%=request.getParameter("league") %>" >
                 	
              		 </a>  
            	</div>
                <div id="left_polling">
               		<a class="left_a" href="polling.jsp?league=<%=request.getParameter("league") %>" >
                 	
              		 </a>  
            	</div>
                <div id="left_guestbook">
               		<a class="left_a" href="guestbook.jsp?league=<%=request.getParameter("league") %>" >
                 
              		 </a>  
            	</div>
    
             </div>
             <div id="xinxi_left_right">
             </div>
         </div>
         <div id="xinxi_right">
            <div id="right_title_kuangjia">
         	<div id="right_title">
                <div id="right_title_name">
                   <p><c:out value="${leagueBean.name}" /></p>
                </div>
                 <!--未登录  -->
                <c:if test="${leagueUserAuth == null&&commonUserAuth == null}">
                <div id="right_title_attention">
                	<div id="right_title_attention_plus">
                    </div>
                    <div id="right_title_attention_text">
                    <form id="attentionAddForm" action="./AttentionAdd">
                    <input name="league" type="hidden" value=<%=request.getParameter("league") %> />
                    <input name="url" type="hidden" id="url" value="" />
                    </form>
                        <a title="加关注" href="javascript:void(0)" onclick="javascript:alert('您好，请您先登录。')"><div id="right_title_attention_plus">
                    加关注</a>
                    </div>
                </div>
                </c:if>
                
                
                <!--未加关注  -->
                <c:if test="${attention == false && leagueUserAuth == null && commonUserAuth != null}">
                <div id="right_title_attention">
                	
                    <div id="right_title_attention_text">
                    <form id="attentionAddForm" action="./AttentionAdd" onsubmit="return false;">
                    <input name="league" type="hidden" value=<%=request.getParameter("league") %> />
                    <input name="url" type="hidden" id="url" value="" />
                    </form>
                    
                        <a id="att" style="display:block" title="加关注&nbsp;&nbsp;" href="javascript:void(0)" onclick="javascript:attention(<%=request.getParameter("league") %>);"><div id="right_title_attention_plus">
                    </div>加关注</a>
                        <a id="cancleAtt" style="display:none" title="取消关注" href="javascript:void(0)" onclick="javascript:cancleAttention(<%=request.getParameter("league") %>);">取消关注</a>
                    </div>
                </div>
                </c:if>
                
                <!--已加关注-->
                <c:if test="${attention == true}">
                <div id="right_title_attention">
                    <div id="right_title_attention_text">
                    <form id="attentionDeleteForm" action="./AttentionDelete">
                    <input name="league" type="hidden" value=<%=request.getParameter("league") %> />
                    <input name="url" type="hidden" id="url" value="" />
                    </form>
                    <a id="att" style="display:none" title="加关注&nbsp;&nbsp;" href="javascript:void(0)" onclick="javascript:attention(<%=request.getParameter("league") %>);"><div id="right_title_attention_plus">
                    </div>加关注</a>
                    <a id="cancleAtt" style="display:block" title="取消关注" href="javascript:void(0)" onclick="javascript:cancleAttention(<%=request.getParameter("league") %>);">取消关注</a>
                    </div>
                </div>
                </c:if>
            </div>
            </div>
           <div id="xinxi_right_biaoqian">
           <c:choose>
           		<c:when test="${param.content == null || param.content != 'hot'}">
           		<div id="right_biaoqian_new">
			    </div>
                <div id="right_biaoqian_hot" class="unselect_tab">
  				  <a title="最热活动" href="?league=<c:out value="${param.league}" />&page=<c:out value="${counter.current}" default="1" />&content=hot">
      				 <div id="right_biaoqian_hot_hot1">
      				 </div>
   				 </a>
   			    </div>
   				 </c:when>
           		<c:otherwise>
           		<div id="right_biaoqian_new" class="unselect_tab">
  				  <a title="最新活动" href="?league=<c:out value="${param.league}" />&page=<c:out value="${counter.current}" default="1" />&content=new">
      				 <div id="right_biaoqian_hot_hot1">
      				 </div>
   				 </a>
			    </div>
                <div id="right_biaoqian_hot">
   			    </div>
   				 </c:otherwise>
   			</c:choose>
           </div>
           <div id="xinxi_right_tianjia_kuang">
           <div id="xinxi_right_tianjia">
                <c:if test="${leagueUserAuth != null && param.league != null && leagueUserAuth.leagueId == param.league}">
           		<div id="xinxi_right_tianjia_biaoji">
                </div>
                <div id="xinxi_right_tianjia_text">
                	<a href="javascript:void(0)"  onclick="javascript:showDiv()">添加</a>
                </div>
                </c:if>
           </div>
           </div>
           <div id="xinxi_right_line_kuang">
           <div id="xinxi_right_line">
           
           </div>
           </div>
           
           
           <div id="xinxi_right_kuangjia">
               <c:forEach items="${activities}" var="activity">
           		<div class="xinxi_right_huodong1">
                	<div class="xinxi_right_caozuo">
            	    	<c:if test="${leagueUserAuth != null && param.league != null && leagueUserAuth.leagueId == param.league}">
                		<div class="xinxi_right_shanchu">
                			&nbsp;&nbsp;<a href="javascript:void(0)" onclick="javascript:showDivDelete(<c:out value="${activity.link}" />)">删除</a>
               			</div>
                		</c:if>
                    </div>
                    <div class="right_huodong_first_kj">
                    <div class="xx_right_huodong_first">
                    	<a href="activity.jsp?activity=<c:out value="${activity.link}" />&league=<%=request.getParameter("league") %>">
               			<div class="xx_right_huodong_first_haibao" >
               			<img src="<c:out value="${activity.entity.postAddress}" />">
               			</div>
               			</a>
               			<div style="float:left;" class="right_huodong_edit_showPic">
               			 <c:if test="${leagueUserAuth != null && param.league != null && leagueUserAuth.leagueId == param.league}">
               			<a href="javascript:void(0)"onclick="javascript:showDivEdit(<c:out value="${activity.link}" />)">添加活动海报</a>
               			</c:if>
               			</div>
                		<div class="right_huodong_first_intruduce">
                  		<div class="right_huodong_name"><a href="activity.jsp?activity=<c:out value="${activity.link}" />&league=<%=request.getParameter("league") %>"><b><c:out value="${activity.entity.name}" /></b></a></div>
                   			
                   		<div class="right_huodong_name1">
                   		<a href="home.jsp?league=<%=request.getParameter("league") %>">
                   		<c:out value="${leagueBean.name}" />
                   		</a>
                   		<br>
                   		<br>
                   		<div style="font-size:13px;">发布时间：<c:out value="${activity.entity.releaseTime}" /></div>
                   		</div>
                   		<br>
                   		<br>
                   		<br>
                   		 <a style = "display: block;color: black;" href ="activity.jsp?activity=<c:out value="${activity.link}" />&league=<%=request.getParameter("league") %>">查看此活动</a>
                   			
                		</div>
                    </div>
                    </div>
                    
                </div>
                </c:forEach>

           </div>
       
			<div id="right_page">
			<c:if test="${maxPage > 0}">
               <c:forEach begin="1" end="${maxPage}" step="1" varStatus="counter">
               <c:choose>
               <c:when test="${counter.current == param.page || (counter.current == 1 && (param.page == null || param.page > maxPage))}">
	            	<div id="right_page_xuanzhong">
	                	<a href="?league=<c:out value="${param.league}" />&page=<c:out value="${counter.current}" default="1" />&content=<c:out value="${param.content}" default="new" />">
	                    	<div id="right_page_xuanzhong_text">
	                    	<c:out value="${counter.current}" />
	                        </div>
	                    </a>
	                </div>
               </c:when>
               <c:otherwise>
               	     <div id="right_page_weixuanzhong">
	                	<a href="?league=<c:out value="${param.league}" />&page=<c:out value="${counter.current}" default="1" />&content=<c:out value="${param.content}" default="new" />">
	                    	<div id="right_page_weixuanzhong_text">
	                    	<c:out value="${counter.current}" />
	                        </div>
	                    </a>
	                </div>
               </c:otherwise>
               </c:choose>
                </c:forEach>
                </c:if>
            
                <div id="right_page_intru">
                    <p>Page <%=(request.getParameter("page") == null || Integer.valueOf(request.getParameter("page")) > (Integer) request.getAttribute("maxPage")) ? 1 : request.getParameter("page") %> of <%=request.getAttribute("maxPage") %></p>
                </div>
                </div> 
               </div>   
    <div class="clear">
	</div>
	</div>
                   

<div id="popDiv" class="mydiv" style="display:none;">添加活动<br/>
 <form action="./ActivityAdd" method="post">
类型:<select name="classId" >
         <c:forEach items="${activityClasses}" var="activityClass">
         <option value="<c:out value="${activityClass.key}" />"><c:out value="${activityClass.value.name}" /></option>
         </c:forEach>
</select><br/>
活动名称：<input type="text"  name="name" /><br/>
活动开始时间：<input type="text"  name="startTime" /><br/>
活动结束时间：<input type="text"  name="endTime" /><br/>
活动详情介绍：<textarea name="information" ></textarea><br/>
联系方式：<input type="text"  name="contact" /><br/>
举办者：<input type="text"  name="organizer" /><br/>
<input type="submit" value="确定" name="submit" />
</form>
<a href="javascript:closeDiv()">关闭</a></div>
<div id="bg" class="bg" style="display:none;"></div>

<div id="popDivDel" class="mydiv" style="display:none;">
确定删除活动？
<form  action="./ActivityDelete" method="post" >
    <input id="del_item_id" type="hidden" name="activity" value="0" />
    <input type="submit" value="确定" name="submit" />
</form>
<a href="javascript:closeDivDelete()">取消</a></div>
<div id="bg" class="bg" style="display:none;"></div> 


<div id="popDivEdit" class="mydiv" style="display:none;">添加活动海报<br>
提示：若上传图片大于900px*600px,服务器端处理后可能会失真。
<form  id="editActivityShowPic" action="./editActivityShowPic" method="post" enctype="multipart/form-data" >
    <div id="uploadForm">
    <p> 
    
     <input id="edit_item_id" type="hidden" name="activity" value="0" /> 
    <input type="file" name="fileforload" />
    </p>
    </div>
   
    <p style="padding-left:100px;text-align:left;"><input type="submit" value="提交"  name="submit"  />
    <a style="padding-left:60px;"href="javascript:closeDivEdit()" >关闭</a></p>
  </form>
</div>
<div id="bg" class="bg" style="display:none;"></div>

      
<jsp:include page="./footer.jsp" flush="true"/> 

</div>
</body>
</html>
